from tools.utils import do_rest
from .queryInfoPage import QueryInfoPage

class RemoveOpById():
    """根据用户的ID删除用户的接口"""
    def __init__(self):
        self.url = 'https://xxxxxx/xx'

    def remove_user(self, shortName):
        """根据用户输入的用户名称来删除该用户"""
        query = QueryInfoPage().query_user(shortName)

        data = query['data']['data'][0]['op']['id']
        response = do_rest(self.url, data, 'post')
        return response.json()